#get_property(DD_RELATIVE_INCLUDE_DIRS GLOBAL PROPERTY DD_RELATIVE_INCLUDE_DIRS)
#get_property(DD_RELATIVE_BUILD_INCLUDE_DIRS GLOBAL PROPERTY DD_RELATIVE_BUILD_INCLUDE_DIRS)
#get_property(DD_LIBRARIES GLOBAL PROPERTY DD_LIBRARIES)

file(RELATIVE_PATH DD_INCLUDE_DIR_RELATIVE_TO_CONFIG_DIR
  "${CMAKE_INSTALL_PREFIX}/${DD_INSTALL_CONFIG_DIR}"
  "${CMAKE_INSTALL_PREFIX}/${DD_INSTALL_INCLUDE_DIR}")

set(DD_LIBRARIES
  ddApp
  vtkDRCFilters)

export(TARGETS ${DD_LIBRARIES} FILE "${CMAKE_BINARY_DIR}/${DD_TARGETS_NAME}.cmake")

configure_file("${CMAKE_SOURCE_DIR}/cmake/director-config.cmake.in" "${CMAKE_BINARY_DIR}/director-config.cmake" @ONLY)
#configure_file("${CMAKE_SOURCE_DIR}/cmake/director-build-config.cmake.in" "${DD_BINARY_DIR}/director-build-config.cmake" @ONLY)

install(FILES "${CMAKE_BINARY_DIR}/director-config.cmake" DESTINATION ${DD_INSTALL_CONFIG_DIR})
install(EXPORT ${DD_TARGETS_NAME} DESTINATION ${DD_INSTALL_CONFIG_DIR})
install(FILES LICENSE.txt DESTINATION ${DD_INSTALL_DOC_DIR})
